<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>

<html>
<head>
    <title>招募待审核</title>
    <script type="text/javascript" src="${ctx}/static/myJs/util.js"></script>
    <script type="text/javascript" src="${ctx}/static/myJs/groupRecruitVolunteerController.js"></script>
</head>

<body>
<div class="content">
    <div class="page-subcate-list">
        <div class="page-searchbox">
            <!--
            <input type="text" placeholder="按姓名查询" id="key">
            <button onclick="javascript:searchByRealName();"><i class="fa fa-plus" aria-hidden="true"></i>查询</button>
            -->
            <div class="pull-right">

                <button onclick="javascript:exportVolunteer('${status}');"><i class="fa fa-plus" aria-hidden="true"></i>导出Excel</button>
            </div>
        </div>
    </div>
    <div class="page-subcate-item">
        <label>状态查询</label>
        <ul class="choices">
            <li onclick="javascript:searchByStatus('0');"><label><input name="status" type="radio" <c:if test="${status == 0}">checked="" </c:if> value="2">待审核</label></li>
            <li onclick="javascript:searchByStatus('2');"><label><input name="status" type="radio" <c:if test="${status == 2}">checked="" </c:if> value="-98">已通过</label></li>
            <li onclick="javascript:searchByStatus('-1');"><label><input name="status" type="radio" <c:if test="${status == -1}">checked="" </c:if> value="-97">已拒绝</label></li>
        </ul>
    </div>
    <div>
        <label>${groupRecruit.title}</label>
    </div>
    <div></div>
    <br/>
    <table class="table table-bordered">
        <thead>
        <tr>
            <th>姓名</th>
            <th>手机</th>
            <th>性别</th>
            <th>状态</th>
            <th>申请日期</th>
            <th style="text-align:center">操作</th>
        </tr>
        </thead>
        <tbody>
        <c:forEach items="${data.content}" var="item">
            <tr id="groupRecruitVolunteer_${item.id}">
                <td>${item.volunteer.realName}</td>
                <td>${item.volunteer.mobile}</td>
                <td>${item.volunteer.sex}</td>
                <td>
                    <c:if test="${item.status == 0}">
                        待审核
                    </c:if>
                    <c:if test="${item.status == -1}">
                        已拒绝
                    </c:if>
                    <c:if test="${item.status == 2}">
                        已通过
                    </c:if>
                </td>
                <td>${item.createTime}</td>
                <td align="center">
                    <a href="${ctx}/groupRecruitVolunteer/detail/${item.id}">查看</a>
                </td>
            </tr>
        </c:forEach>
        </tbody>
    </table>
    <tags:pagination page="${data}" paginationSize="5"/>
</div>
</body>
</html>
